import * as vscode from 'vscode';
import { _e, registerCommand } from './utils';
import { registerApiTree } from './vscode.api';
import {uiCommands,uiCommandsCb} from "./vscode.window";

console.log("--api");
export function activate(context: vscode.ExtensionContext) {
	uiCommands.forEach((v, k) => {
		if (uiCommandsCb[k]) {
			registerCommand(context,v.command,uiCommandsCb[k]);
		} else {
			_e("cb not find:" + v.command);
		}
	});

	// 注册apiTree
	registerApiTree(context);
}

// this method is called when your extension is deactivated
export function deactivate() { }
